import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // phone: null, //登录手机号
    phone:sessionStorage.getItem('phone')
  },
  getters: {
  },
  mutations: {
    updatePhone(state, payload) {
      state.phone = payload
      window.sessionStorage.setItem('phone',payload)
    },
    //退出
    logout(state,payload){
      state.phone=payload 
      window.sessionStorage.removeItem('phone')
    }
  },
  actions: {
  },
  modules: {
  }
})
